import request from '@/utils/request'

// 查询业务客户列表
export function listBasic(query) {
  return request({
    url: '/customer/basic/list',
    method: 'get',
    params: query
  })
}
// 查询业务客户列表
export function listSuperior(query) {
  return request({
    url: '/customer/basic/superList',
    method: 'get',
    params: query
  })
}
// 查询收益列表
export function listDetailed(query) {
  return request({
    url: '/customer/basic/returnsDetailedList',
    method: 'get',
    params: query
  })
}
// 查询下级会员列表
export function listMember(query) {
  return request({
    url: '/customer/basic/subordinateMember',
    method: 'get',
    params: query
  })
}
// 查询下级伙伴列表
export function listPartner(query) {
  return request({
    url: '/customer/basic/subordinatePartner',
    method: 'get',
    params: query
  })
}
// 查询提现列表
export function listWithdrawal(query) {
  return request({
    url: '/customer/basic/withdrawalRecordList',
    method: 'get',
    params: query
  })
}
// 查询业务客户详细
export function getBasic(memberNo) {
  return request({
    url: '/customer/basic/customerBasicInfo/' + memberNo,
    method: 'get'
  })
}

// 新增业务客户
export function addBasic(data) {
  return request({
    url: '/customer/basic',
    method: 'post',
    data: data
  })
}
// 设置上级
export function setSuperMember(data) {
  return request({
    url: '/customer/basic/setSuperMember',
    method: 'put',
    data: data
  })
}

// 修改业务客户
export function updateBasic(data) {
  return request({
    url: '/customer/basic',
    method: 'put',
    data: data
  })
}
// 启用停用分销资格
export function startORdisableQualification(data) {
  return request({
    url: '/customer/basic/startORdisableQualification',
    method: 'put',
    params: data
  })
}
// 删除业务客户
export function delBasic(id) {
  return request({
    url: '/customer/basic/' + id,
    method: 'delete'
  })
}

// 导出业务客户
export function exportBasic(query) {
  return request({
    url: '/customer/basic/export',
    method: 'get',
    params: query
  })
}
